Use ArrayExpansion for fixed buffer fields#81536
Merged
AlekseyTs merged 8 commits intodotnet:mainfrom Dec 22, 2025
Merged
Conversation
Contributor
Author
Member
AaronRobinsonMSFT
left a comment
There was a problem hiding this comment.
Looks reasonable to me.
tmat
reviewed
Dec 5, 2025
src/ExpressionEvaluator/Core/Source/ResultProvider/Helpers/InlineArrayHelpers.cs
Outdated
Show resolved
Hide resolved
tmat
reviewed
Dec 5, 2025
src/ExpressionEvaluator/Core/Source/ResultProvider/Helpers/InlineArrayHelpers.cs
Outdated
Show resolved
Hide resolved
tmat
approved these changes
Dec 5, 2025
Member
tmat
left a comment
There was a problem hiding this comment.
LGTM. Compiler team should review.
333fred
reviewed
Dec 5, 2025
src/ExpressionEvaluator/Core/Source/ResultProvider/Helpers/InlineArrayHelpers.cs
Outdated
Show resolved
Hide resolved
src/ExpressionEvaluator/Core/Source/ResultProvider/Helpers/TypeHelpers.cs
Outdated
Show resolved
Hide resolved
333fred
approved these changes
Dec 6, 2025
Member
|
@dotnet/roslyn-compiler for a second review |
AlekseyTs
reviewed
Dec 11, 2025
src/ExpressionEvaluator/Core/Source/ResultProvider/Helpers/InlineArrayHelpers.cs
Outdated
Show resolved
Hide resolved
AlekseyTs
reviewed
Dec 11, 2025
src/ExpressionEvaluator/Core/Source/ResultProvider/Helpers/InlineArrayHelpers.cs
Outdated
Show resolved
Hide resolved
AlekseyTs
reviewed
Dec 11, 2025
src/ExpressionEvaluator/Core/Source/ResultProvider/Helpers/InlineArrayHelpers.cs
Outdated
Show resolved
Hide resolved
AlekseyTs
reviewed
Dec 11, 2025
src/ExpressionEvaluator/Core/Source/ResultProvider/Helpers/TypeHelpers.cs
Outdated
Show resolved
Hide resolved
Contributor
|
Done with review pass (commit 4) #Closed |
Contributor
Author
|
@AlekseyTs ready for re-review |
AlekseyTs
reviewed
Dec 15, 2025
src/ExpressionEvaluator/Core/Source/ResultProvider/Helpers/InlineArrayHelpers.cs
Outdated
Show resolved
Hide resolved
AlekseyTs
reviewed
Dec 15, 2025
src/ExpressionEvaluator/Core/Source/ResultProvider/Helpers/InlineArrayHelpers.cs
Outdated
Show resolved
Hide resolved
333fred
approved these changes
Dec 16, 2025
tmat
reviewed
Dec 17, 2025
src/Compilers/CSharp/Portable/Symbols/Synthesized/GeneratedNames.cs
Outdated
Show resolved
Hide resolved
tmat
approved these changes
Dec 17, 2025
Contributor
|
@asundheimMSFT Thank you for the contribution |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Fixed buffer fields look like structs with a single member in metadata, so we would use
MemberExpansionwhich only shows the first element. Instead we should useArrayExpansion, in a similar fashion to what we did for[InlineArray]in #81254.Details
InlineArrayHelpersthat identifies generated fixed buffer typesTypeproperties.Testing
Added test that validates that we get an

ArrayExpansionfor a fixed buffer. Comment in the test describes why we cannot use the typical testing approach that we use for otherArrayExpansiontests.